package com.linghu.study.springbootshirojwtdemo.mapper;

import com.linghu.study.springbootshirojwtdemo.bean.Permission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author: linghu
 * @date:
 * @version: 1.0.0
 * @description: permissionMapper
 */
@Mapper
public interface PermissionMapper {

    /**
     * 根据用户Id获取该用户权限
     *
     * @param userId userId
     * @return 权限列表
     */
    @Select("select * from permission where user_id=#{userId}")
    List<Permission> getPermissionsByUserId(int userId);

}
